/**
 * 
 */
package com.hwhp.dao.console.impl;

import java.util.ArrayList;
import java.util.List;

import com.hwhp.dao.BaseDao;
import com.hwhp.dao.console.DepartDao;
import com.hwhp.entity.Deptment;

/**
 * @author user
 *
 */
public class DepartDaoImpl implements DepartDao {

	private BaseDao baseDao = null;
	
	public List<Deptment> getChildDepart(String parentId) {
		List<Deptment> deptList = new ArrayList();
		String hql = "from Deptment as d where d.parentid='"+parentId+"'";
    	//String hql ="from DcpUser as d ";
    	deptList = (List<Deptment>)this.baseDao.query(hql);
    	//deptList = HibernateUtil.query(hql);
    	return deptList ;
	}
	
	public BaseDao getBaseDao() {
		return baseDao;
	}
	
	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}
}
